﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq;

namespace SoftwareLogistics.SharepointClient.Library.Models
{
    public class SPOrderBy
    {
        public string Field { get; set; }
        public string Value { get; set; }
        public bool IsAscending { get; set; }

        public XElement GetXML()
        {
            var element = new XElement("FieldRef",
                new XAttribute("Name",Field),
                new XAttribute("Ascending", IsAscending ? "TRUE" : "FALSE"));            

            return element;
        }
    }
}
